/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.product.service;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nai365.nart.common.core.to.seckill.SeckillSessionWithSkusTO;
import com.nai365.nart.common.core.util.R;
import com.nai365.nart.product.entity.SpuInfo;
import com.nai365.nart.product.vo.SpuSaveVo;

import java.util.List;

/**
 * spu信息
 *
 * @author baogs
 * @date 2022-07-01 11:05:45
 */
public interface SpuInfoService extends IService<SpuInfo> {

	void savesupInfo(SpuSaveVo vo);

    R up(Long spuId);

    boolean down(Long spuId);

    void saveBaseSpuInfo(SpuInfo spuInfoEntity);

	R upChain(Long spuId);

	IPage queryPageByCondtion(Page page, SpuInfo spuInfo, String key);

    List<SeckillSessionWithSkusTO> getLates3DaySpuInfo();

	List<SeckillSessionWithSkusTO> getSpuInfoSessions(String spuId);

	JSONObject getBySkuId(Long skuId);
}
